<?php
header('Content-type:text/html;charset=utf8');
/**
 * xysc users Version1.0
 * ==================================
 * Copy 2016-2017
 * Web:www.xjh7.com
 * ==================================
 * Author:xjh
 * Date:2016-3-10
*/

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>index.css" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>DialogBySHF.css" />
   <script src="<?php echo backweb_JS_URL;?>jquery-1.9.1.min.js"></script>
<script>

function updcategory($category_id){
	parent.location.href='./index.php?r=backweb/category/categoryupd&category_id='+$category_id;
}

</script>
</head>
<style>
	.bbtn{
		background:#edf6fa;
		width:100px;
		height:40px;
		cursor:pointer;
		border-radius:10px;
	}
	.bbtn:hover{
		background:#f3f5f6;
		border-radius:10px;	
	}
</style>
<body>
	<div id="table" style="margin: 10px">
        		<form action="./index.php?r=backweb/category/sort" method="post" id="f">
				<?php foreach ($category_info as $v) {?>
				<input type="hidden" name="category_id[]" value="<?php echo $v['category_id']; ?>" id="h" />
				<?php }?>
				
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
                <tr >
                   <th width="80"  style="text-align:center;" >编号</th>
                   <th width="80" style="text-align:center;" >分类名</th>
                   <th width="200"style="text-align:center;" >分类简介</th>
                   <th style="text-align:center;"><input type="submit" name="send" value="排序" style="width:50px;height:35px;line-height:35px;"  id="submit"  /></th>
                   <th style="text-align:center;">操作</th>
                   <th style="text-align:center;">规格配置</th>
                   <th style="text-align:center;">参数配置</th>
                   
                </tr>
         	<?php $i = 0;foreach ($category_info as $v) {?>
         	<?php $i++;?>
         	<tr class="tr"  >
         		<td class="td_center"  ><?php echo $i;?></td>
         		<td class="td_center" ><?php echo $v['category_name'];?></td>
         		<td class="td_center" ><?php echo $v['category_info'];?></td>
         		<td class="td_center"><input type="text" name="sort[]" value="<?php echo $v['sort']; ?>" style="width:40px;text-align:center;border:1px solid #ccc"  /></td>
         		<td class="td_center"><span><a href="#" onclick="updcategory(<?php echo $v['category_id']; ?>)">修改</a>|<a href="./index.php?r=backweb/category/categorydel&category_id=<?php echo $v['category_id']; ?>">删除</a></span></td>
         		<td class="td_center" ><input type="button" onclick="tc(<?php echo $v['category_id'];?>,'<?php echo $v['category_name'];?>')" value="<?php echo $v['category_name'];?>" class="bbtn"   /></td>
         		<td class="td_center" ><input type="button" onclick="cs(<?php echo $v['category_id'];?>,'<?php echo $v['category_name'];?>')" value="<?php echo $v['category_name'];?>" class="bbtn"   /></td>
         		</tr>				
			<?php }?>
              </table>
			</form>
			<div class="page" style="text-align: center;margin-top: 5px">
                <div class="pagination">
                  <ul>
                      <li class="first-child"><?php echo $page_list[0];?></li>
                      <li class="disabled" ><?php echo $page_list[1];?></li>
                      <li class="active"><?php echo $page_list[2];?></li>
                      <li><?php echo $page_list[3];?></li>
                      <li><?php echo $page_list[4];?></li>
                  </ul>
			</div>
			</div>
        </div>
        
<div style="text-align:center;">
				<p>共执行<em style="font-weight:bold;"><?php echo $number;?></em>个sql，查询到<em style="font-weight:bold;"><?php echo $info_count;?></em>条记录，用时 <em style="font-weight:bold;"><?php echo $times;?></em> 秒</p>
				<p>版权所有 © 2016-2017 <em style="font-weight:bold;">xjh&lj</em>，并保留所有权利。</p>
			</div>

<script type="text/javascript" src="<?php echo backweb_JS_URL;?>jquery.js"></script>
<script type="text/javascript" src="<?php echo backweb_JS_URL;?>DialogBySHF.js"></script>
<script type="text/javascript">
            function tc(id,cat_name){
            	$.DialogBySHF.Dialog({ Width: 1024, Height: 1200, Title: cat_name+"操作", URL: './index.php?r=backweb/category/catAttrConfig&category_id='+id });
            }
            function cs(id,cat_name){
            	$.DialogBySHF.Dialog({ Width: 1024, Height: 1200, Title: cat_name+"操作", URL: './index.php?r=backweb/category/catParamConfig&category_id='+id });
            }
</script>
</body>
<body>